package com.mydesignpattern.beijing.adapter;

import com.mydesignpattern.beijing.adapter.china.ChinaComputer;
import com.mydesignpattern.beijing.adapter.german.DBSocket;
import com.mydesignpattern.beijing.adapter.german.DBSocketImpl;

public class GermanyHotel {
    //德国旅馆，自带德标插座
    private static DBSocket dbSocket = new DBSocketImpl();


    public static void main(String[] args) {
        //用适配器进行转换
        SocketAdapter adapter = new SocketAdapter(dbSocket);
        ChinaComputer pc = new ChinaComputer();
        //客户端调用转换后的接口
        pc.workWithPower(adapter);

    }

}
